<?php
/**
 * Joomla! 1.5 component ArticleCashRewards
 *
 * @version $Id: articlecashrewards.php 2009-05-10 01:47:01 svn $
 * @author Maverick
 * @package Joomla
 * @subpackage components
 * @license GNU/GPL
 *
 * Review and approve the articles and assign points and cash rewards.
 * Users can see their articles and the points/cash rewards assigned in the front-end module.
 */
// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

// Require the base controller
require_once JPATH_ADMINISTRATOR.DS.'components'.DS.'com_articlecashrewards'.DS.'helpers'.DS.'constants.php';
require_once (JPATH_COMPONENT.DS.'controller.php');

// Require specific controller if requested
if($controller = JRequest::getVar('controller', 'mypage')) {
	require_once (JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php');
}
// Initialize the controller
$classname	= 'ArticleCashRewardsController'.$controller;
$controller = new $classname( );

$document	= & JFactory::getDocument();
$document->addStyleSheet(JURI::base(true).'/components/com_articlecashrewards/assets/css/styles.css');

// Perform the Request task
$controller->execute( JRequest::getVar('task') );
$controller->redirect();
?>